package lab02.test37;

/**
 * Created by 14394 on 2017/11/13.
 */
public class StudentDemo {
    public static void main(String[] args) {
        double[] du1 = {90, 95, 100};

        double[] dp1 = {82, 85, 88};

        Undergraduate u1 = new Undergraduate("张三", du1);
        Graduate p1 = new Graduate("王五", dp1);

    }

    public String turnType(int type) {
        if (type == 1) {
            return "本科生";
        } else {
            return "研究生";
        }
    }

    public String getStudentGrade(int type, double averageGrades) {
        if (type == 1) {
            if (averageGrades >= 60) {
                return "通过";
            }else {
                return "不通过";
            }
        } else {
            if (averageGrades >= 80) {
                return "通过";
            }else {
                return "不通过";
            }
        }
    }
}
